/**
 * Creates a new OpenNodeView.
 * 
 * @constructor
 */
mindmaps.OpenNodeView = function() {
	var self = this;

	// create dialog
	var $dialog = $("#open-dialog").tmpl().dialog({
		autoOpen : false,
		modal : true,
		zIndex : 5000,
		width : 700,
		close : function() {
			$(this).dialog("destroy");
			$(this).remove();
		}
	});

	/**
	 * Shows the dialog.
	 * 
	 */
	this.showOpenDialog = function() {
		$dialog.dialog("open");
	};

	/**
	 * Hides the dialog.
	 */
	this.hideOpenDialog = function() {
		$dialog.dialog("close");
	};
};

/**
 * Creates a new OpenNodePresenter. The presenter can load documents from
 * the local storage or hard disk.
 * 
 * @constructor
 * @param {mindmaps.EventBus} eventBus
 */
mindmaps.OpenNodePresenter = function(view) {

	/**
	 * Initialize.
	 */
	this.go = function() {
		view.showOpenDialog();
	};
};